//index.js
//获取应用实例
const fetch = require('../../utils/fetch.js')

Page({
  data: {
    autoplay: true,
    interval: 5000,
    duration: 1000
  },
  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  onLoad: function () {
    wx.showLoading({
      title: '加载中',
    })
    fetch('food/index').then((res) => {
      wx.hideLoading();
      this.setData({
        listData: res.data,
      })
    }, () => {
      wx.hideLoading();
    });
  },
  gostart: function(){
    wx.navigateTo({
      url: '../list/list',
    })
  }
})
